<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');

class Product_m extends MY_Model
{

    const TBL = 'fox_product';

    function __construct()
    {
        parent::__construct();
    }


    public function getAccount($where = "", $limit = "", $start = 0, $field = "*", $orderkey = "id",$orderBy = "desc")
    {
        if($where){
            $this->db->where($where);
        }
        if ($limit) {
            $this->db->limit($limit, $start);
        }
        $this->db->select($field);
        $this->db->order_by($orderkey, $orderBy);
        $query = $this->db->get('fox_product');
        $data  = $query->result_array();
        $query->free_result();
        return $data;
    }

}
